﻿// (c)2010 David Schwarz (david.schwarz@live.com)
// This file is licensed under GNU GPL v2 license, see more at http://www.gnu.org/licenses/gpl-2.0.html
namespace Z2.Core
{

    /// <summary>
    /// Represents grass
    /// </summary>
	public class Grass : ObjectBase
    {

        #region Constructor

        public Grass()
			: base(SpriteManager.Instance.LoadSprite("grass", 1, 1))
		{
			Sprite.Depth = Depth(Depths.AbovePlayer1);
		    IsStatic = true;
        }

        #endregion

        #region Methods

        protected override void OnCollision(ref IntersectionResult result, ObjectBase obj)
        {
            // cancel collision
            result = IntersectionResult.None;

            //
            // TODO: Run grass movement animation
            //
        }

        internal override bool CantCollide(ObjectBase obj)
		{
			return !(obj is Player);
        }

        #endregion

    }
}
